package itheima.edu.info.Exdents.Inface;

import com.sun.source.tree.ParenthesizedTree;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.util.Date;

public class Shoee {
    public static void main(String[] args)throws ParseException {
        /*DateTimeFormatter p =DateTimeFormatter.ofPattern("yyyy年nn月mm日 bb:cc");*/
        Date date=new Date();
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
       String s= sdf.format(date);
        System.out.println(s);
        System.out.println("----------");
        String ss ="2019-04-09 11:33:45";
        SimpleDateFormat sdf2=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date dd = sdf2.parse(ss);
        System.out.println(dd);
    }
}
